/*
 * s_common_msg.h
 *
 *  Created on: Sep 27, 2020
 *      Author: hemingway
 */

#ifndef USER_COMMON_S_COMMON_EVT_H_
#define USER_COMMON_S_COMMON_EVT_H_

#include "s_common.h"

typedef enum
{
    s_common_default_evt = 0,
    s_common_uart_evt,
    s_common_ble_evt,
}s_common_evt_type;

typedef struct
{
    unsigned char *data;
    unsigned short len;
    unsigned char para;
    s_common_evt_type evt_type;
}s_common_evt_t;

extern s_common_state s_common_evt_enqueue(s_common_evt_type type, \
                                               unsigned char *data, unsigned short len ,\
                                               unsigned char para);
extern s_common_state s_common_evt_handle_dequeued(s_common_evt_t *evt);

#endif /* USER_COMMON_S_COMMON_EVT_H_ */
